package bairui.international.console.web.controller.wrap.category.properties.item;

import javax.validation.Valid;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.output.FomatOutput;

import bairui.international.model.domain.jpa.id.ID_ProductCategoryProperty;
import bairui.international.service.Service_ProductCategoryPropertyItem;

/**
 *
 * 属性项编辑
 *
 * @generated
 * 
 * @see STest_C_Wrap_Category_PropertiesItemEdit_Edit 测试
 *
 */
@Controller
public class C_Wrap_Category_PropertiesItemEdit_Edit
 extends SC_Wrap_Category_PropertiesItemEdit_Edit 
{
	
	@Autowired private Service_ProductCategoryPropertyItem service_ProductCategoryPropertyItem;
	
	/**
	 * 编辑
	 */
	@Action(Edit.class)
	@PutMapping(Edit.RequestMappingValue)
	public @FomatOutput @ResponseBody Object edit(
		@Valid Edit.InputModel input, 
		@PathVariable(name=Edit.PathVariableName.CategoryId) long categoryId, 
		@PathVariable(name=Edit.PathVariableName.PropertyId) ID_ProductCategoryProperty propertyId, 
		@PathVariable(name=Edit.PathVariableName.PropertyItemId) long propertyItemId
	) throws Exception {
		service_ProductCategoryPropertyItem.updateWithNonNullProperties(propertyItemId, input);
		//
		return null;
	}
	

}
